package com.zisu.springbootsource.ioc;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component
public class HelloService {
    private Student student;

    @Qualifier("bird")
    @Autowired
    Animal animal;

    public Student getStudent() {
        return student;
    }

    public void setStudent(Student student) {
        this.student = student;
    }

    public String hello(){
        return animal.getName();
    }

    public String helloAnimal(){
        return animal.getName();
    }
}
